package com.hyper_yang.javase.collections;

import com.hyper_yang.javase.collections.pojo.Student;

import java.util.ArrayList;
import java.util.Collection;

public class Collection_contains {
    public static void main(String[] args) {
        Collection<Student> collection = new ArrayList<>();

        Student stu1 = new Student("zhangsan",23);
        Student stu2 = new Student("lisi",24);
        Student stu3 = new Student("wangwu",25);

        collection.add(stu1);
        collection.add(stu2);
        collection.add(stu3);

        Student stu4 = new Student("zhangsan",23);

        System.out.println(collection.contains(stu4));

    }
}
